<%-- 
    Document   : index
    Created on : 24/05/2012, 17:21:47
    Author     : Diogo, Gilvan, Lélandi e Lucas
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<f:view locale="#{localeController.currentLocale}">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title><h:outputText value = "#{msg.tituloPagina}"/></title>
        </head>
        <body>
            <center>
                <h:form id="formAlterarAtivo">  

                    <h:panelGrid columns="2">
                        <f:facet name="header">
                            <h:outputText value = "#{msg.tituloPaginaEditarAtivo}"/>
                        </f:facet>
                        <h:outputText value = "#{msg.tituloNumeroSerie}"/>
                        <h:inputText value= "#{InventarioController.objInventario.numeroSerie}"/>

                        <h:outputText value = "#{msg.tituloColunaNome}"/>
                        <h:inputText value = "#{InventarioController.objInventario.nome}" />

                        <h:outputText value = "#{msg.tituloColunaDescricao}"/>
                        <h:inputText value = "#{InventarioController.objInventario.descricao}" />

                        <h:outputText value = "#{msg.tituloColunaFabricante}"/>
                        <h:inputText value = "#{InventarioController.objInventario.fabricante}" />

                        <h:outputText value = "#{msg.tituloColunaMarca}"/>
                        <h:inputText value = "#{InventarioController.objInventario.marca}" />

                        <h:outputText value = "#{msg.tituloColunaModelo}"/>
                        <h:inputText value = "#{InventarioController.objInventario.modelo}" />

                        <h:outputText value = "#{msg.tituloColunaIp}"/>
                        <h:inputText value = "#{InventarioController.objInventario.endIp}" />

                        <h:outputText value = "#{msg.tituloColunaTipo}"/>
                        <h:inputText value = "#{InventarioController.objInventario.tipo}" />
                        
                        <h:outputText value = "#{msg.tituloColunaDtCompra}"/>
                        <h:inputText value= "#{InventarioController.objInventario.dtCompra}">
                            <f:convertDateTime pattern="dd/MM/yyyy"/>
                        </h:inputText>

                        <h:outputText value = "#{msg.tituloColunaValorCompra}"/>
                        <h:inputText value = "#{InventarioController.objInventario.valorCompra}" />

                        <h:outputText value = "#{msg.tituloColunaDtVenda}"/>
                        <h:inputText value= "#{InventarioController.objInventario.dtVenda}">
                            <f:convertDateTime pattern="dd/MM/yyyy"/>
                        </h:inputText>
                        
                        <h:outputText value = "#{msg.tituloColunaValorVenda}"/>
                        <h:inputText value = "#{InventarioController.objInventario.valorVenda}" />

                        <h:outputText value = "#{msg.tituloColunaValorDepreciacao}"/>
                        <h:inputText value = "#{InventarioController.objInventario.valorDepreciacao}" />

                        <h:outputText value = "#{msg.tituloColunaCategoria}"/>
                        <h:inputText value = "#{InventarioController.objInventario.categoria}" />

                        <h:outputText value = "#{msg.tituloColunaFornecedor}"/>
                        <h:inputText value = "#{InventarioController.objInventario.fornecedor}" />

                        <h:outputText value = "#{msg.tituloColunaLocalizacao}"/>
                        <h:inputText value = "#{InventarioController.objInventario.localizacao}" />

                        <h:outputText value = "#{msg.tituloColunaSoftware}"/>
                        <h:inputText value = "#{InventarioController.objInventario.software}" />

                        <!--Codigo para alterar item-->
                        <center>
                            <f:facet name="header">
                                <h:outputText value="#{msg.tituloColunaEditar}" />
                            </f:facet>
                            <h:commandButton value="#{msg.tituloBotaoGravar}" action="#{InventarioController.alterarAtivo}"/>
                        </center>

                    </h:panelGrid>
                    <h:commandButton value = "#{msg.tituloBotaoCancelar}" action="voltar" />
                </center>
            </h:form>
        </body>
    </html>
</f:view>
